Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Jun 21, 2025

No description provided.

Copy link
Contributor Author

arsenm commented Jun 21, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@arsenm arsenm marked this pull request as ready for review June 21, 2025 02:24
@llvmbot
Copy link
Member

llvmbot commented Jun 21, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Matt Arsenault (arsenm)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/145135.diff

2 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp (+2-2)
  • (modified) llvm/test/CodeGen/AMDGPU/lds-reject-mixed-absolute-addresses.ll (+3-3)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp b/llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp
index 241dbd63eb5c0..aa72c3e61f680 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMemoryUtils.cpp
@@ -278,8 +278,8 @@ LDSUsesInfoTy getTransitiveUsesOfLDS(const CallGraph &CG, Module &M) {
         }
         if (HasAbsoluteGVs.has_value()) {
           if (*HasAbsoluteGVs != IsAbsolute) {
-            report_fatal_error(
-                "Module cannot mix absolute and non-absolute LDS GVs");
+            reportFatalUsageError(
+                "module cannot mix absolute and non-absolute LDS GVs");
           }
         } else
           HasAbsoluteGVs = IsAbsolute;
diff --git a/llvm/test/CodeGen/AMDGPU/lds-reject-mixed-absolute-addresses.ll b/llvm/test/CodeGen/AMDGPU/lds-reject-mixed-absolute-addresses.ll
index e1ee9b2df9fa8..eacf6759b039a 100644
--- a/llvm/test/CodeGen/AMDGPU/lds-reject-mixed-absolute-addresses.ll
+++ b/llvm/test/CodeGen/AMDGPU/lds-reject-mixed-absolute-addresses.ll
@@ -1,10 +1,10 @@
-; RUN: not --crash opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds < %s 2>&1 | FileCheck %s
-; RUN: not --crash opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds < %s 2>&1 | FileCheck %s
+; RUN: not opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds < %s 2>&1 | FileCheck %s
+; RUN: not opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds < %s 2>&1 | FileCheck %s
 
 @var1 = addrspace(3) global i32 poison, !absolute_symbol !0
 @var2 = addrspace(3) global i32 poison
 
-; CHECK: Module cannot mix absolute and non-absolute LDS GVs
+; CHECK: LLVM ERROR: module cannot mix absolute and non-absolute LDS GVs
 define amdgpu_kernel void @kern() {
   %val0 = load i32, ptr addrspace(3) @var1
   %val1 = add i32 %val0, 4

@arsenm arsenm merged commit a961ba8 into main Jun 21, 2025
11 checks passed
@arsenm arsenm deleted the users/arsenm/amdgpu/avoid-report_fatal_error-lds-mixed-absolute-address branch June 21, 2025 14:54
@JonChesterfield
Copy link
Collaborator

Thanks. Was thinking about this last night, I probably need to change the setup to tolerate running arbitrary numbers of times with arbitrary interleaving, as the documented "run once at codegen" requirement is being extensively ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants